package operation.impl;

import book.BookList;
import operation.IOperation;

public class RemoveOperation implements IOperation{
    @Override
    public void work(BookList bookList) {
        System.out.println("您现在进行的是书籍下架操作~");
        System.out.println("请输入您要下架的书的书名->");
        String booksName = scanner.next();
        if (bookList.isContains(booksName)){
            bookList.bookUndercarriage(booksName);
            System.out.println("书籍下架成功！");
        }else {
            System.err.println("书架没有该书，无法下架~~");
        }
    }
}
